// 导入router
import Vue from 'vue'
import VueRouter from 'vue-router'
// 懒加载模式

// 安装router
Vue.use(VueRouter)

const routes = [
    {
        path: '/commonTodo',
        name: 'Todo',
        component: ()=>import("../views/common/CommonTodo"),
        hidden: true, // router扫描时隐藏
    },
    {
        path: '/commonBlog',
        name: 'Blog',
        component: ()=>import("../views/common/CommonBlog"),
        hidden: true, // router扫描时隐藏
    },
    {
        path: '/commonBlogDetail',
        name: 'BlogDetail',
        component: ()=>import("../views/common/CommonBlogDetail"),
        hidden: true, // router扫描时隐藏
    },
    {
        path: '/',
        name: 'Login',
        component: ()=>import("../views/Login"),
        hidden: true, // router扫描时隐藏
        // children: [
        //
        // ]
    },
    // {
    //     path: '/main',
    //     name: 'Main',
    //     component: ()=>import("../views/Main"),
    //     hidden: true // router扫描时隐藏
    // },
    // 使用软加载模式见menus.js
    {
        path: '/home',
        name: '导航一',
        component: ()=>import("../views/Home"),
        children: [ // 子路由防止直接到App展示
            // {
            //     path: '/teacher/teacherExamManage',
            //     name: '教师考试管理',
            //     component: ()=>import("../views/teacher/TeacherExamManage")
            // },
            // {
            //     path: '/teacher/teacherDeriveExcelManage',
            //     name: '考试导入导出管理',
            //     component: ()=>import("../views/teacher/TeacherDeriveExcelManage"),
            // },
            {
                path: '/common/userInfo',
                name: '个人中心',
                component: ()=>import("../views/common/UserInfo"),
                hidden: true,
            }
        ]
    },
    // ,
    // {
    //     path: '/teacherExamManage',
    //     name: '考试管理',
    //     component: ()=>import("../views/teacher/TeacherExamManage"),
    // }
    // ,
    // {
    //     path: '/teacherDeriveExcelManage',
    //     name: '考试导入导出管理',
    //     component: ()=>import("../views/teacher/TeacherDeriveExcelManage"),
    // }
]

const  router = new VueRouter({
    // mode: 'history',
    routes
})

export default router
